<div class="wd-form">

	<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id' => 'article-form',
	//'enableAjaxValidation' => true,
  'htmlOptions'=>array('enctype'=>'multipart/form-data','class'=>'well'),
    
    
)); ?>
	<fieldset>

	<p class="note">
		<?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
	</p>
	
		<div class="wd-input">
		<?php echo $form->labelEx($model,'category_id'); ?>
		<?php
			$criteria = new CDbCriteria;
			$criteria->compare('is_published', 1, true);
			$criteria->compare('country_id', Country::model()->visitorCountryID(), true);
			$criteria->order = 'name ASC';
			$datas=Category::model()->findAll($criteria);
			$dropDownDatas = CHtml::listData($datas , 'id', 'name');
			echo $form->dropDownList($model,'category_id', $dropDownDatas, array('empty'=>'Select category')
					//$model()->findAll(), 'id', 'name', 'parrent_id'),
			); 
		?>
		<?php //echo $form->textField($model, 'category_id', array('maxlength' => 128)); ?>
		<?php echo $form->error($model,'category_id'); ?>
		</div>
		
		<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Save')); ?>
		<?php echo CHtml::link('Cancel',array('users/categoryAuthor'), array('class'=>'btn')); ?>
	</fieldset>

<?php
$this->endWidget();
?>
</div><!-- form -->